#include "mixmusic.h"

using std::string;
using namespace EPOC;

MixMusic::MixMusic()
{
	SetClassID(kCLASSID_MIXMUSIC);
	m_pSDLMixMusic = NULL;
	m_sFilePath = "";
}

MixMusic::~MixMusic()
{
	MixMusic::Cleanup();
}

void MixMusic::Cleanup()
{
	if(m_pSDLMixMusic)
		Mix_FreeMusic(m_pSDLMixMusic);
	
	m_pSDLMixMusic = NULL;
	m_sFilePath = "";
}

bool MixMusic::Initialize(string sFilePath, Mix_Music *pSDLMixMusic)
{
	if(m_pSDLMixMusic)
		return false;

	m_sFilePath = sFilePath;
	m_pSDLMixMusic = pSDLMixMusic;

	return true;
}